var mysql  = require('mysql');

var connection = mysql.createConnection({
    host       : 'localhost',
    user       : 'root',
    password   :'1234',
    database     :'test'
});

connection.connect();
var sql = 'SELECT * FROM ceshi1'

connection.query(sql,function (err,result) {
    if(err){
        console.log('[SELECT ERROR] - ',err.message);
        return;
    }
    console.log('--------------------------SELECT----------------------------');
    console.log(result);
    console.log('------------------------------------------------------------\n\n');
})

connection.end()